Open Dev Kit Documentation :: Demo - OpenAI
TheHow it Works
The interface primarily uses
Chat & Image Requests
- A request is sent using either:
- Function
OpenAI.RequestChatCompletions() for text/chat responses. - Function
OpenAI.RequestImage() for image generation or modification.
- Function
- The result is stored in a variable of type
AIResult . - The script waits for
AIResult.Ready to become1 (true), signaling the request is complete. - If
AIResult.Error contains a value, an error occurred, and will be displayed via an alert box. - If
AIResultChoice.FinishReason is anything other than "stop", this means an error occurred and is displayed inline. - Otherwise, the output is processed and the response is retrieved from
AIResult.Choices /AIResultChoice.Content .
If you think anything is missing, please feel free to: submit documentation feedback on this page
